package com.demo.passenger.hotel.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.demo.passenger.hotel.entity.PassengerResidenceInfo;
import com.demo.passenger.hotel.mapper.PassengerResidenceInfoMapper;
import com.demo.passenger.hotel.service.IPassengerResidenceInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 旅客入住信息登记表 服务实现类
 * </p>
 *
 * @author weifucheng
 * @since 2019-07-13
 */
@Service
public class PassengerResidenceInfoServiceImpl extends ServiceImpl<PassengerResidenceInfoMapper, PassengerResidenceInfo> implements IPassengerResidenceInfoService {
    @Override
    public List<PassengerResidenceInfo> listByParams(Page<PassengerResidenceInfo> page, PassengerResidenceInfo PassengerResidenceInfo) {
        return this.baseMapper.listByParams(page,PassengerResidenceInfo);
    }

    @Override
    public Page<PassengerResidenceInfo> listByParams(PassengerResidenceInfo PassengerResidenceInfo, Integer current, Integer size) {
        Page<PassengerResidenceInfo> page=new Page<PassengerResidenceInfo>();
        page.setSize(size);
        page.setCurrent(current);
        page.setRecords(this.baseMapper.listByParams(page,PassengerResidenceInfo));
        return page;
    }

}
